Skip to content

✨ Redesign the Effection home page (GC-framed arc + interactive tabs)#1207

Open
taras wants to merge 4 commits into
v4from
tm/new-home-page
Open

✨ Redesign the Effection home page (GC-framed arc + interactive tabs)#1207
taras wants to merge 4 commits into
v4from
tm/new-home-page

Conversation

@taras

@taras taras commented Jul 5, 2026

Copy link
Copy Markdown
Member

Motivation

The old home page — logo, tagline, and a feature grid — doesn't make the case for Effection to the people most likely to adopt it: JS library authors. This rebuilds it from the mockup around a concrete narrative that reasons from an analogy every JS developer already trusts — garbage collection — and extends it to async.

The page:

  1. The deal — "JavaScript cleans up your memory. It never cleans up your async." Values belong to a scope and get reclaimed; async work belongs to nothing.
  2. The exception — the runtime can't reclaim async work because it belongs to no scope, so every AbortSignal, unsubscribe, close()/finally, and using is you reconstructing the missing lifetime by hand.
  3. The name — that missing property is structured concurrency.
  4. Effection — brings it to JS: <6KB, dependency-free, no build step, 5 years in production.
  5. See for yourself — five real use cases that each look too simple to be correct, in an interactive tab set.
  6. The proof — an interactive operation tree, three superpowers (halt, context, synchronous-by-default), the GC-analogy capstone, an async/await ↔ Effection rosetta, and a closing CTA.

Approach

Built entirely on the site's own stack — revolution server-rendered JSX + Tailwind v4 — reusing the shared header/footer. No client framework. Dark-mode variants throughout.

Components:

  • components/usecase-tabs.tsx — the "see for yourself" tabs (timeout, parallel, stream, background, async teardown), each a code sample + one-line guarantee. CSS-only (radio/checkbox-hack) — pill + panel switching work with no JavaScript.
  • components/code-window.tsx — a macOS-window code block, syntax-highlighted at render time with refractor (the tokenizer rehype-prism-plus already uses), so colours match the site and follow the OS light/dark preference.
  • components/operation-tree.tsx + assets/home-islands.js — a static SVG driven by a small vanilla-JS island that animates the halt↓ / teardown↑ cascade on click.
  • components/install-copy.tsx — a copy-to-clipboard install pill (same island).

Note on colours: brand colours use arbitrary hex values (text-[#14315D] etc.) because the custom Tailwind tokens (blue-primary / blue-secondary / pink-secondary) are not emitted by the current v4 build — the compiled tailwind/main.css contains none of them (true on v4 today too). Worth fixing globally in a follow-up.

Rebased on v4; deno fmt --check, deno lint, and deno check all pass. Verified end-to-end against a local dev server (light, dark, tab switching, halt animation, copy button).

Screenshots

Hero — the memory-vs-async framing + "The exception"

Hero and the exception

See for yourself — interactive use-case tabs (shown with the "Stream" tab selected; switching is pure CSS)

Use-case tabs

Three superpowers — halt, context, synchronous-by-default

Three superpowers

Dark mode

Dark mode hero

🤖 Generated with Claude Code

@pkg-pr-new

pkg-pr-new Bot commented Jul 5, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/effection@1207

commit: 3cb3d22

@codspeed-hq

codspeed-hq Bot commented Jul 5, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing tm/new-home-page (3cb3d22) with v4 (4f400d0)

Open in CodSpeed

@taras taras changed the title ✨ Redesign the Effection home page ✨ Redesign the Effection home page (GC-framed arc + interactive tabs) Jul 5, 2026
taras added 2 commits July 5, 2026 17:06
Rebuild the Effection home page from the new mockup: a problem→proof→
solution narrative for library authors. Replaces the logo + feature-grid
landing page with beats covering the await-boundary leak, the proven model,
Effection's leak-proof rewrite, an interactive operation tree, three
superpowers, the GC analogy, an async/await rosetta, and a closing CTA.

Ported to the site's own framework (revolution SSR + Tailwind), with dark
variants throughout and syntax highlighting reusing the site's Prism theme.

New pieces:
- components/code-window.tsx — macOS-window code block, highlighted via
  refractor (the tokenizer rehype-prism-plus already uses) so colours match
  the rest of the site and follow the OS light/dark preference.
- components/operation-tree.tsx + assets/home-islands.js — static SVG driven
  by a small vanilla-JS island that animates the halt↓/teardown↑ cascade.
- components/install-copy.tsx — copy-to-clipboard install pill (same island).

Brand colours use arbitrary hex values because the custom Tailwind color
tokens (blue-primary/blue-secondary/pink-secondary) are not emitted by the
current v4 build.
Reworks the narrative from the mockup's v3 ("arc B"): lead with the
garbage-collection analogy instead of the leak bug, name structured
concurrency at the moment the reader already feels the gap, then prove it
with a new interactive "evidence" section.

Changes:
- New GC-first hero ("In JavaScript, you never free memory.") and a "The
  exception" section; drop the old problem/badge hero, the await-boundary
  table, the proven-model cards, and the leak-proof code block.
- New components/usecase-tabs.tsx — five real use cases (timeout, parallel,
  stream, background, async teardown) as CSS-only tabs (radio/checkbox-hack,
  no JS), each a code sample + one-line guarantee.
- Revised superpower/capstone/Effection copy per the v3 mockup; operation
  tree, rosetta and CTA unchanged.
Updates the home page to the mockup's v4 pass:
- Two-line contrast hero ("JavaScript cleans up your memory. / It never
  cleans up your async.") and a memory-vs-async framing.
- Sharper "The exception" section naming AbortSignal / close()/finally /
  using as hand-rolled reconstructions of the missing lifetime, plus a
  bridging paragraph after the async/await claim.
- Copy tweaks: evidence eyebrow "See for yourself", operation-tree heading
  "Every operation belongs to the one that started it".

Keeps all three superpowers (halt, synchronous-by-default, context) rather
than collapsing synchronous-by-default into a footnote.
- Hero collapses to one balanced line (memory + async in the same
  sentence) instead of the two-tone split.
- Restore the "same tree, twice" section framing and order the three
  superpowers halt → context → synchronous-by-default.
@joshamaju

Copy link
Copy Markdown
Contributor

This looks great.

Just a little suggestion, can we replace the gradients with a single colour? They give of "vibe coded".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants